package org.runecore.util;

import java.io.*;

/**
 * RuneCore
 * Aug 20, 2011
 * @author Harry Andreas<Harry@RuneCore.org>
 */

public class FileOperations {
	
	/**
	 * Writes an object to file
	 */
	public static void writeToFile(Object toWrite, File file) {
		try {
			PrintWriter out = new PrintWriter(new FileWriter(file));
			out.append(toWrite.toString());
			out.flush();
			out.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

}